import time 
x=0
a=[]
def booble(f):
    st=time.time()
    for i in f:
        a.append(int(i))
    for x in range(len(a)-1):
        for y in range(len(a)-2, x-1, -1):
            if a[y+1]<a[y]:
                 a[y+1],a[y]=a[y],a[y+1]
    end=time.time()
    t=(end-st)* 1000
    return t
  
f3=open("m1_sorted.txt")
f1=open("m2_reverse.txt")
f2=open("m3_shuffle.txt")

print("m1_sorted.txt",int(booble(f3)), "milliseconds")
print("m2_reverse.txt",int(booble(f1)), "milliseconds")
print("m3_shuffle.txt",int(booble(f2)), "milliseconds")
